A Tactical RPG in Hexagonal Grids


Project Overview
Project Type: Personal
Focus: System Design, Game Framework
Role: Game Designer and Programmer
Game Engine: Unity, Godot
Language: C#
Description:
Trial of Chains (Tactic) is a tactical RPG prototype, highlighting "Chains Effect".
focuses on building up strategic counter loops in diversified Hero Classes, this is a
primitive battle prototype for a Tactical RPG.
Controls:
LMB = Confirm
RMB = Cancel
Q = Normal Attack
W = Skill 1
E = Skill 2
Tab = Edit Mode / Battle Mode
F = End Turn
Features:
▪ Hexagonal tactic board
▪ Auto path-finding (bypass obstacles)
▪ Accessible grids calculation (Range for Move, Attack, Skills)
▪ Forcing-displacement skills for target(s) and source actor
▪ Displacement hits in chain
▪ AOE skills supporting different damages and displacements for grids in
range
▪ Skills data for 5 actor classes
▪ Assist-attack
▪ Action Point (AP) for turns
▪ Terrain effects
▪ Enemy AI
▪ Runtime Level Edit
I iterated and extended many features, and also removed a large part of them in the developing process. But those transient versions of ideas are valuable because they demonstrate the design process.
So, I will show the game by parts in a timeline order. Each part will introduce one aspect of the game, even though some of they have been modified or removed through iterations.
Part 01 - Assist Attack & Forcing Displacement
When a unit is attacking, if the main-target unit is also in the range of the attacking unit’s allies,
then those allies will assist-attack the target unit without costing any Action Point.
Assist Attack
When a unit attacks with a forcing-move skill, target unit(s) will move accordingly after taking
damages. Some skills have move effect for the attacker too. Forcing displacement means move effect for
either source or target(s), or both of them.
Forcing Displacement
Below are technical demos for Assist-Attack, Push-Attack and Hit Chain (in orignial version of square
board).
Assist Attack
Push Attack & Hit Chain
/P01 - Assist Attack.png)
Assist Attack
/P01 - Forcing Displacement.png)
Forcing Displacement
Assist Attack
Push Attack & Hit Chain
Part 02 - Class Skills
Skills include properties of cast & effect range, AP(Action Point) cost, Damage
Factors, and Special Effects. You can see more details in P07 - Game Data.
Cast range is shown in blue, meaning the range where you can cast the skill.
Effect range is shown in red, meaning the range that will be effected.
AP means Action Point, a resource to be consumed to take actions in a turn.
Damage Factors will be mulitplied by Source ATK, then subtract Target DEF to calculate
the damage of a skill. Calculation of Damage is:
Damage = Source ATK × Damage Factors - Target DEF
Special Effects include Forcing-displacement, AOE, and more.
First, just let's look at Forcing-displacement and AOE.
Forcing-displacement for single target is calculated by the relative coordinates of Source and Target.
All classes Push-Attack
Forcing displacement for Source can be adjusted by relative coordinate, like Warrior and Assassin pierce
type of skills.
Skill with Pierce Move
Assassin Skill: Dash-pierce
AOE skills can be adjusted by relative coordinates, which can be used to customize AOE effect range.
Special AOE range
Ranger Skill: Multi-shot
Cross-Cut Diagonal Supported
AOE and Forcing-displacement can be combined to be Forcing-displacement AOE, like Warrior
Cross-cut and Whirl-wind.
Warrior Skill: Cross-cut
Warrior Skill: Whirl-wind
With flexible AOE and Forcing-displacement, many interesting skills can be implemented, like Mage
Burning-path and Point-explosion.
Mage Skill: Burning-path & Explosion
What if you can change hero class in a turn ...
Class Changeable Mode 1
Class Changeable Mode 2
Here demonstrates the all class Skills with Assist-Attack effect. Note that skill now can be triggered
into empty grid. (It doesn't need to assign an enemy as target.)
All Class Skills, Free Trigger Target
Cast range is shown in blue, meaning the range where you can cast the skill.
Effect range is shown in red, meaning the range that will be effected.
AP means Action Point, a resource to be consumed to take actions in a turn.
Damage Factors will be mulitplied by Source ATK, then subtract Target DEF to calculate the damage of a skill. Calculation of Damage is:
All classes Push-Attack
Skill with Pierce Move
Assassin Skill: Dash-pierce
Special AOE range
Ranger Skill: Multi-shot
Cross-Cut Diagonal Supported
Warrior Skill: Cross-cut
Warrior Skill: Whirl-wind
Mage Skill: Burning-path & Explosion
Class Changeable Mode 1
Class Changeable Mode 2
All Class Skills, Free Trigger Target
Part 03 - Terrain Effect
Terrain Effect is another factor to make tactic effecicent.
Here shows terrain effects for Wall and Grassland.
Wall -> Broken Wall -> Ground
If wall gets hit (actively or passively), it will change to Broken Wall.
Wall and Broken Wall are not passable. If an actor move towards it, it will get object-hit damage.
Wall & Broken Wall
Refined Wall
Grassland -> Burning Grassland
Grassland will be ignited into Burning Grassland. Actors will get burning damage at the end of every
turn if it is in that grid.
Grassland & Burning Grassland
Wall & Grassland
Water will kill the actor instantly if it gets into the grid.
See more terrain effects in P07 - Game Data.
Here shows terrain effects for Wall and Grassland.
Wall -> Broken Wall -> Ground
If wall gets hit (actively or passively), it will change to Broken Wall.
Wall and Broken Wall are not passable. If an actor move towards it, it will get object-hit damage.
Wall & Broken Wall
Refined Wall
Grassland will be ignited into Burning Grassland. Actors will get burning damage at the end of every turn if it is in that grid.
Grassland & Burning Grassland
Wall & Grassland
See more terrain effects in P07 - Game Data.
Part 04 - Auxiliary Features
This part demonstrates important auxiliary features.
First is Actor Move Path. To make it running, I use a recursive algorithm to calculate all move range
(calculate block objects like other actors and unpassable terrains). Then store every recursive step
into a list for each move range grid as routes.
So when an actor is moving into a grid, just retireve route element (or step) from that target grid
and move with an animation step by step.
Unit Move Path & Animation
Enemy AI is simple in this project.
The algorithm is randomly choose an enemy actor as active one, and then calculate if there is any actor
in attack range, if not, then randomly choose an actor as target and move to that by applying
path-finding as you move an actor.
All enemy team will have fixed action steps which can be adjusted in Edit Mode (in next video).
Enemy AI & Action Points
Edit mode is designed for runtime testing and also for level desgin.
You can dynamicly add / remove actors in both teams, change terrains using terrain brush.
There are checkboxes on top to enable / disable Assist Attack, Kill Replace, Skill No Assist, AP Test,
and an Enemy AP slider.
Assist Attack : mentioned in Part 01, toggle on of off for the effect.
Kill Replace: if main target is killed, the source actor will go to its coordinate.
Skill No Assist: if an actor is using skill not normal attack, there will be no Assist
Attack.
AP Test: if it's on, AP won't be cost. You can take infinite actions in a turn.
Enemy AP: slider has range from 1 to 5, which means the actions that enemy team can
take in a turn
Runtime Edit Mode
First is Actor Move Path. To make it running, I use a recursive algorithm to calculate all move range (calculate block objects like other actors and unpassable terrains). Then store every recursive step into a list for each move range grid as routes.
So when an actor is moving into a grid, just retireve route element (or step) from that target grid and move with an animation step by step.
Unit Move Path & Animation
The algorithm is randomly choose an enemy actor as active one, and then calculate if there is any actor in attack range, if not, then randomly choose an actor as target and move to that by applying path-finding as you move an actor.
All enemy team will have fixed action steps which can be adjusted in Edit Mode (in next video).
Enemy AI & Action Points
You can dynamicly add / remove actors in both teams, change terrains using terrain brush.
There are checkboxes on top to enable / disable Assist Attack, Kill Replace, Skill No Assist, AP Test, and an Enemy AP slider.
Assist Attack : mentioned in Part 01, toggle on of off for the effect.
Kill Replace: if main target is killed, the source actor will go to its coordinate.
Skill No Assist: if an actor is using skill not normal attack, there will be no Assist Attack.
AP Test: if it's on, AP won't be cost. You can take infinite actions in a turn.
Enemy AP: slider has range from 1 to 5, which means the actions that enemy team can take in a turn
Runtime Edit Mode
Part 05 - Hexagonal Board
From the perspective of design, Hexagonal Board brings more possibility than Square Board. So let's
updat into Hexagonal.
Hexagonal Board is very different that Square Board. The adjacent coordinates change from 4 to 6. The
big difference is x and y axes are no longer perpendicular. Thus, a lot of calculations and algorithms
need to be updated into Hexagonal version, including actor base range, move range, cast range, effect
range, adjacent coordinates, forcing displacement directions, AOE range, etc.
Update to Hexagonal Board
After updates for all calculations and algorithms mentioned above, here is Hexagonal Board.
Plus, new features have been added, such as preview move path, continuous HP and AP, unit info panel.
Water as the new terrain now is functional.
Preview Path, Continuous HP & AP bar, Terrain Water, Unit Info
New feature of preview Action Result has been added.
Action Result includes damage and Forcing Displacement.
Yellow arrow stands for target move; Blue arrow stands for source move.
Preview Action Result, including Forcing Move & Damage
Now you can view terrain info dynamically when you hover mouse on a grid.
When an action is going to take, you can preview the remaining AP after taking that action.
Also, the HP bar now has value to show current HP and max HP.
Terrain Info, AP Bar Value Preview
Hexagonal Board is very different that Square Board. The adjacent coordinates change from 4 to 6. The big difference is x and y axes are no longer perpendicular. Thus, a lot of calculations and algorithms need to be updated into Hexagonal version, including actor base range, move range, cast range, effect range, adjacent coordinates, forcing displacement directions, AOE range, etc.
Update to Hexagonal Board
Plus, new features have been added, such as preview move path, continuous HP and AP, unit info panel.
Water as the new terrain now is functional.
Preview Path, Continuous HP & AP bar, Terrain Water, Unit Info
Action Result includes damage and Forcing Displacement.
Yellow arrow stands for target move; Blue arrow stands for source move.
Preview Action Result, including Forcing Move & Damage
When an action is going to take, you can preview the remaining AP after taking that action.
Also, the HP bar now has value to show current HP and max HP.
Terrain Info, AP Bar Value Preview
Part 06 - New Skills
Mage skill Explosion used to have radial push effect on square board. Now the same radial push effect is
there on hexagonal board.
Note that the hit chain effect is also supported.
Updated Mage Skill Explosion
New skill Fire-tornado for Mage has been added. This skill will have rotating effect and ignore hit
chain.
Mage Skill: Fire Tornado
Spearman skill Pull-back is refined to support hit chain.
Refined Spearman Skill: Pull-back
New skill Interchange-position for Warrior has been added. This skill will switch position for the
source and target. And target must be an ally.
Warrior Skill: Interchange-position
New skill Heal for Mage has been added. Mage now can heal an ally or itself without calculating the
distance.
Mage Skill Heal 1
Mage Skill Heal 2
Mage Skill Heal 3
Mage Skill Heal 4
A new type of skill, Projectile, has been added. It can be used to design like Direct-Shot for Ranger,
Holy-Bolt for Warrior, and Fireball for mage.
There are two key properties for projectiles: shoot range and pierce.
The projectile will disappear after hitting for times of pierce or reaching its shoot range.
Projectile Type Skills 1 (Warrior, Ranger, Mage)
Projectile Type Skills 2 (Warrior, Ranger, Mage)
Note that the hit chain effect is also supported.
Updated Mage Skill Explosion
Mage Skill: Fire Tornado
Refined Spearman Skill: Pull-back
Warrior Skill: Interchange-position
Mage Skill Heal 1
Mage Skill Heal 2
Mage Skill Heal 3
Mage Skill Heal 4
There are two key properties for projectiles: shoot range and pierce.
The projectile will disappear after hitting for times of pierce or reaching its shoot range.
Projectile Type Skills 1 (Warrior, Ranger, Mage)
Projectile Type Skills 2 (Warrior, Ranger, Mage)
Part 07 - Game Data
For this project, my focus is building gameplay framework, not gameplay experience or level design. So
I haven't playtested and tuned all the values. The game data framework contains design instances as
below.
With this framework, it's easy to create new design items, like new actor classes,
skills, and terrains.
Table of Actor Classes and Attributes
Class
Warrior
Ranger
Assassin
Spearman
Mage
Base Range
Attack
5
5
5
5
5
Defense
3
3
3
3
3
Max HP
20
20
20
20
20
Move Range
4
4
4
4
4
Step AP Cost
1
1
1
1
1
Table of Warrior Skills
Skill
Attack
Push-Attack
Cross-Cut
Whirl-Wind
Interchange-Position
Holy-Bolt
Cast & Effect Range
AP Cost
5
10
15
20
15
Damage Factor(s)
1
2
Main: 3; Other: 2
All 2
/
All 1 / -1
(Damage / Heal)
Effect
/
Target moves backward = 1
Targets move backward = 1
Targets move backward = 1
Source and Target change position
Projectile
hit ally = heal
hit enemy = damage
Pierce = 2
Range = 3
Table of Ranger Skills
Skill
Attack
Pierce-Shot
Multi-Shot
Arrow-Tempest
Direct-Shot
Cast & Effect Range
AP Cost
5
10
10
20
15
Damage Factor(s)
1
All 2
Main: 3; Other: 2
Main: 3; Other: 2
All 2
Effect
/
AOE
AOE
AOE
Projectile
Pierce = 3
Range = 5
Table of Assassin Skills
Skill
Attack
Pull-Dagger
Piercing
Burst-Piercing
Assassin-Blade
Switch-Dagger
Cast & Effect Range
AP Cost
5
10
10
15
15
10
Damage Factor(s)
1
2
2
Main: 3; Other: 2
3
2
Effect
/
Source & Target move backward (relative to Source) = 1
Source moves to Target back
Source moves through 2 Targets
/
Source & Target change positions
Table of Spearman Skills
Skill
Attack
Press-Onward
Pull-Back
Multi-Push
Cast & Effect Range
AP Cost
5
10
10
15
Damage Factor(s)
1
2
2
All 2
Effect
/
Source & Target move forward = 1
Target moves to Source back
Targets move backward = 1
Table of Mage Skills
Skill
Attack
Point-Explosion
Burning-Path
Fire-Tornade
Heal
Fireball
Cast & Effect Range
AP Cost
5
10
15
20
10
15
Damage Factor(s)
1
Main: 2; Other: 1
Main: 3; Other: 2
Main: 2; Other: 1
-1
All 1
Effect
/
Targets move as above
/
Targets move as above
Heal target
Projectile
Pierce = 2
Range = 4
Table of Terrains
Terrain
Ground
Wall
Grass
Water
Broken Wall
Burning Grass
Image
Active Passable
Y
N
Y
N
N
Y
Passive Passable
Y
N
Y
Y
Y
Y
Effect
/
Block movement and projectiles. Damage twice to destroy.
If damaged, lights on Fire.
Block movement. Kill unit instantly.
Block movement and projectiles. One hit will destroy it.
Lights unit on Fire.
With this framework, it's easy to create new design items, like new actor classes, skills, and terrains.
Class |
![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
Base Range | ![]() |
![]() |
![]() |
![]() |
![]() |
Attack | 5 | 5 | 5 | 5 | 5 |
Defense | 3 | 3 | 3 | 3 | 3 |
Max HP | 20 | 20 | 20 | 20 | 20 |
Move Range | 4 | 4 | 4 | 4 | 4 |
Step AP Cost | 1 | 1 | 1 | 1 | 1 |
Skill | Attack | Push-Attack | Cross-Cut | Whirl-Wind | Interchange-Position | Holy-Bolt |
---|---|---|---|---|---|---|
Cast & Effect Range | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
AP Cost | 5 | 10 | 15 | 20 | 15 | |
Damage Factor(s) | 1 | 2 | Main: 3; Other: 2 | All 2 | / | All 1 / -1 (Damage / Heal) |
Effect | / | Target moves backward = 1 | Targets move backward = 1 | Targets move backward = 1 | Source and Target change position | Projectile hit ally = heal hit enemy = damage Pierce = 2 Range = 3 |
Skill | Attack | Pierce-Shot | Multi-Shot | Arrow-Tempest | Direct-Shot |
---|---|---|---|---|---|
Cast & Effect Range | ![]() |
![]() |
![]() |
![]() |
![]() |
AP Cost | 5 | 10 | 10 | 20 | 15 |
Damage Factor(s) | 1 | All 2 | Main: 3; Other: 2 | Main: 3; Other: 2 | All 2 |
Effect | / | AOE | AOE | AOE | Projectile Pierce = 3 Range = 5 |
Skill | Attack | Pull-Dagger | Piercing | Burst-Piercing | Assassin-Blade | Switch-Dagger |
---|---|---|---|---|---|---|
Cast & Effect Range | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
AP Cost | 5 | 10 | 10 | 15 | 15 | 10 |
Damage Factor(s) | 1 | 2 | 2 | Main: 3; Other: 2 | 3 | 2 |
Effect | / | Source & Target move backward (relative to Source) = 1 | Source moves to Target back | Source moves through 2 Targets | / | Source & Target change positions |
Skill | Attack | Press-Onward | Pull-Back | Multi-Push |
---|---|---|---|---|
Cast & Effect Range | ![]() |
![]() |
![]() |
![]() |
AP Cost | 5 | 10 | 10 | 15 |
Damage Factor(s) | 1 | 2 | 2 | All 2 |
Effect | / | Source & Target move forward = 1 | Target moves to Source back | Targets move backward = 1 |
Skill | Attack | Point-Explosion | Burning-Path | Fire-Tornade | Heal | Fireball |
---|---|---|---|---|---|---|
Cast & Effect Range | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
AP Cost | 5 | 10 | 15 | 20 | 10 | 15 |
Damage Factor(s) | 1 | Main: 2; Other: 1 | Main: 3; Other: 2 | Main: 2; Other: 1 | -1 | All 1 |
Effect | / | Targets move as above | / | Targets move as above | Heal target | Projectile Pierce = 2 Range = 4 |
Terrain | Ground | Wall | Grass | Water | Broken Wall | Burning Grass |
---|---|---|---|---|---|---|
Image | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Active Passable | Y | N | Y | N | N | Y |
Passive Passable | Y | N | Y | Y | Y | Y |
Effect | / | Block movement and projectiles. Damage twice to destroy. | If damaged, lights on Fire. | Block movement. Kill unit instantly. | Block movement and projectiles. One hit will destroy it. | Lights unit on Fire. |
Conclusion & Reflection
▪ The main goal of this project is to challenge myself to build game framework for Tactic RPG.
So I'm focusing on more of Technical Design than a Game Design.
▪ I used to extend systems in RPG maker to do the similar thing. But because that's not built
from scratch, the freedom is limited. This time I use Godot, I almost tried all TRPG features I want
to try, path-finding, AOE, forcing-displacement, terrain effects, hexagonal board, game database,
etc.
▪ I always think TRPG is challenging thus interesting. The simulation of a combat enables
players to make use of objects. It's a pure mental calculation type of game. In the process of doing
this project, I made another Unreal version of Trial of Chains, which I name it "puzzle" and this one
"tactic". Because it's my personal project, I put framework on the first place, the content
next.
▪ This project gives me practice in many aspect. The move range calculation algorithm is the
thing I implemented more than 3 times in different game engines. Also, the first trial of implementing
Hexagonal board gives me not only experience but also confidence. Even though the functionalities are
there, I know there are many things can be improved. My experience is that, every time you make the
old feature, you will be a bit better than before.
▪ I used to extend systems in RPG maker to do the similar thing. But because that's not built from scratch, the freedom is limited. This time I use Godot, I almost tried all TRPG features I want to try, path-finding, AOE, forcing-displacement, terrain effects, hexagonal board, game database, etc.
▪ I always think TRPG is challenging thus interesting. The simulation of a combat enables players to make use of objects. It's a pure mental calculation type of game. In the process of doing this project, I made another Unreal version of Trial of Chains, which I name it "puzzle" and this one "tactic". Because it's my personal project, I put framework on the first place, the content next.
▪ This project gives me practice in many aspect. The move range calculation algorithm is the thing I implemented more than 3 times in different game engines. Also, the first trial of implementing Hexagonal board gives me not only experience but also confidence. Even though the functionalities are there, I know there are many things can be improved. My experience is that, every time you make the old feature, you will be a bit better than before.